import React from "react";
import "../../i18n/config";
import { useTranslation } from "react-i18next";
import { Button } from "antd";
function Index() {
  const { t, i18n } = useTranslation();
  const changeLange = () => {
    i18n.changeLanguage(i18n.language === "zh" ? "en" : "zh");
  };
  return (
    <div>
      <h1>
        {t("only")}
        <Button
          type="primary"
          onClick={changeLange}
          style={{ marginLeft: "20px" }}
        >
          {i18n.language === "zh" ? "英文" : "中文"}
        </Button>
        <a href="https://finance.cnr.cn/zmn/20220323/t20220323_525773911.shtml">
          点击进入麻豆传媒
        </a>
      </h1>
    </div>
  );
}

export default Index;
